<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>img-marker</title>

    <link rel="stylesheet" href="./index.css">

</head>
<body>
    <div class="page">
        <div class="page-option">
            <div class="page-option">
                <select name="" id="imgSelector" onchange="selectImg()">
                    <option value="./imgs/test.jpg">图一</option>
                    <option value="./imgs/th0922.jpg">图二</option>
                </select>
            </div>
            <div class="page-option">
                <select name="" id="mode" onchange="selectMode()">
                    <option value="0">移动</option>
                    <option value="1">画笔</option>
                    <option value="2">橡皮擦</option>
                </select>
            </div>
            <div class="page-option">
                <input type="color" value="#f00" onchange="selectPencilColor()">
            </div>
            <div class="page-option">
                <input type="range" max="2" min="0.1">
            </div>
            <div class="page-option">
                <select name="" id="pencilWidth" onchange="selectPencilWidth()">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="10">10</option>
                    <option value="15">15</option>
                </select>
            </div>
            <div class="page-option">
                <div class="page-option">
                    <button onclick="resetImgPos()">复位</button>
                </div>
                <div>
                    <button onclick="handleRollBack()">撤销</button>
                    <button onclick="handleRollForward()">恢复</button>
                    <button onclick="handleClear()">清空</button>
                </div>
            </div>
            <div class="page-option">
                <button onclick="handleSave()">保存</button>
            </div>
            <div id="previewImg" class="preview-img">
                <img src="" alt="">
            </div>
        </div>
        <div id="canvasWrapper" class="canvas-wrapper">
            <canvas id="canvas" class="canvas"></canvas>
        </div>
    </div>
    <script src="./index.js"></script>
</body>
</html>